<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>分页</title>
    <style>
        li {
            list-style: none;
        }

        #page {
            display: flex;
            margin: 50px 50px;
            font-size: 14px;
        }

        #page li {
            border-left: 1px solid #ddd;
            border-top: 1px solid #ddd;
            border-bottom: 1px solid #ddd;
            padding: 10px 14px;
        }

        #page li:first-child {
            border-radius: 5px 0px 0px 5px;
        }

        #page li:last-child {
            border-right: 1px solid #ddd;
            border-radius: 0px 5px 5px 0px;
        }

        #page li a {
            color: #428bca;
            text-decoration: none;
        }

        .active {
            background-color: #428bca;
        }

        #page .active a {
            color: #fff;
        }
    </style>
</head>

<body>

    <div id="p1"></div>
    <ul id="page"></ul>

    <script type="text/javascript" src="./jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="./jqpaginator.min.js"></script>
    <script type="text/javascript">
        $.jqPaginator('#page', {
            totalPages: 100,  //总页数
            totalCounts: 10,  //分页总条目数
            visiblePages: 10, //最多显示的页码数
            currentPage: 3,   //当前页码
            activeClass: 'active',
            first: '<li class="prev"><a href="javascript:;">首页</a></li>',
            last: '<li class="prev"><a href="javascript:;">尾页</a></li>',
            prev: '<li class="prev"><a href="javascript:;">上一页</a></li>',
            next: '<li class="next"><a href="javascript:;">下一页</a></li>',
            page: '<li class="page"><a href="javascript:;">{{page}}</a></li>',
            onPageChange: function (num, type) {
                $('#p1').text(type + '：' + num);
            }
        });
    </script>
</body>

</html>